/***
 * 上传表的数据模型
 */
module.exports = class Upload extends require('./model') {

  /***
   * 获取首页面的轮播图
   */
  static getIndexSwiperAll () {
    return new Promise((resolve, reject) => {
      let sql = 'SELECT * FROM upload LIMIT 0,5'

      console.log('获取首页面的轮播图sql='+sql);
      console.log('--------------------------');

      this.dbQuery(sql)
          .then(result => {
            resolve(result)
          })
          .catch(error => {
            console.log(`获取首页面的轮播图失败：${ error.message }`)
            reject(error);
          })
    })
  }



}